package com.binance.notification.api;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import com.binance.master.configs.FeignConfig;
import com.binance.master.constant.Constant;
import com.binance.master.models.APIRequest;
import com.binance.master.models.APIResponse;
import com.binance.notification.api.request.AlertPriceQueryRequest;
import com.binance.notification.api.request.AlertPriceRequest;
import com.binance.notification.api.request.DeleteAlertPriceRequest;
import com.binance.notification.api.request.LoadAlertPriceRequest;
import com.binance.notification.api.response.AlertPriceQueryResponse;
import com.binance.notification.api.response.AlertPriceResponse;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@FeignClient(name = Constant.NOTIFICATION_WEB_SERVICE, configuration = FeignConfig.class)
@Api(value = "设置价格提醒服务", tags = "设置价格提醒服务：用户维护价格提醒等")
@RequestMapping("/alert-price")
public interface AlertPriceApi {

    @ApiOperation(value = "新增一条价格提醒设置")
    @PostMapping(value = "/insert")
    public APIResponse<AlertPriceResponse> insert(@RequestBody APIRequest<AlertPriceRequest> request);

    @ApiOperation(value = "根据userId加载价格提醒设置数据")
    @PostMapping(value = "/load")
    public APIResponse<List<AlertPriceResponse>> load(@RequestBody APIRequest<LoadAlertPriceRequest> request);

    @ApiOperation(value = "根据ID和UserId删除一条价格提醒设置")
    @PostMapping(value = "/delete")
    public APIResponse<Void> delete(@RequestBody APIRequest<DeleteAlertPriceRequest> request);
    
    @ApiOperation(value="后台管理系统查询用户价格提醒相关数据")
    @PostMapping(value = "/query")
    public APIResponse<AlertPriceQueryResponse> query(@RequestBody APIRequest<AlertPriceQueryRequest> request);
}
